<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>ModifyReservationSC1TC1</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">ModifyReservationSC1TC1</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Use Case: Modify Reservation-->
<!--Scenario 1: Successful Modification-->
<!--Test Case 1: Modify current Flight-->
<!--Go to website-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<!--Login-->
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User4</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass4</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--We in Customer portal?-->
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<!--Search Flights-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<!--No filter-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[2]</td>
	<td></td>
</tr>
<!--2nd one-->
<!--Make Reservation for Flight 1001-->
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Fill in all the stuff-->
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>Hot</td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Girl</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>F25</td>
</tr>
<tr>
	<td>click</td>
	<td>//div[@id='page1']/div/label[2]/span</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='mealOption'])[2]</td>
	<td></td>
</tr>
<!--Make the reservation-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are in the payment page-->
<tr>
	<td>assertTextPresent</td>
	<td>Payment</td>
	<td></td>
</tr>
<tr>
	<td>assertTextPresent</td>
	<td>Price: 100</td>
	<td></td>
</tr>
<!--Choose Points-->
<tr>
	<td>type</td>
	<td>name=point</td>
	<td>100</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we made a reservation-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/h4</td>
	<td>1 new reservation added!</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-blue &gt; div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<!--Check if we are on the Reservation List Page-->
<tr>
	<td>assertTitle</td>
	<td>Reservation List</td>
	<td></td>
</tr>
<!--Check if our reservation is there-->
<tr>
	<td>assertTextPresent</td>
	<td>Hot Girl</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>name=r1</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>name=view</td>
	<td></td>
</tr>
<!--Let's change our reservation-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.page-control.span11 &gt; div.frames &gt; form &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if you get a pay telling u that you will get a refund-->
<tr>
	<td>assertTextPresent</td>
	<td> You will be refunded with 0.0 and 100 points</td>
	<td></td>
</tr>
<!--Click OK-->
<tr>
	<td>clickAndWait</td>
	<td>name=OK</td>
	<td></td>
</tr>
<!--Are we in the Reservation page?-->
<tr>
	<td>assertTextPresent</td>
	<td>Reservation</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>E10</td>
</tr>
<tr>
	<td>select</td>
	<td>name=meal</td>
	<td>label=Vegetarian</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Are we in the Payment Page?-->
<tr>
	<td>assertTitle</td>
	<td>Modified Payment</td>
	<td></td>
</tr>
<!--Check if the price is right-->
<tr>
	<td>assertTextPresent</td>
	<td>Price: 200.0</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=point</td>
	<td>200</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--k cool.-->
<!--Did the reservation change?-->
<tr>
	<td>assertTextPresent</td>
	<td>Reservation Modified</td>
	<td></td>
</tr>
<!--Go back and check if the reservation got changed-->
<tr>
	<td>clickAndWait</td>
	<td>//a[contains(@href, '/Website/BackButtonURL?username=User4')]</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div[2]/a[2]/div/div/h2</td>
	<td>800 pts</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-blue &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>name=r1</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>name=view</td>
	<td></td>
</tr>
<!--Check if all our information is correct.-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div[2]/div/div/table/tbody/tr</td>
	<td>Hot Girl E10 Business vegetarian</td>
</tr>
<!---->
</tbody></table>
</body>
</html>
